# coding=utf-8
from .CMemory import CMemory


class CTxtObjects(CMemory):
    def __init__(self, data):
        super(CTxtObjects, self).__init__(data)

    def Name(self):
        return self.get_byte_pointer(0x00)

    def NameWB(self):
        return self.get_widebyte_pointer(0x40)

    def Token(self, n):  # n < 3
        return self.get_byte(0xC0 + n)

    def SpwanMax(self):
        return self.get_byte(0xC3)

    def Selectable(self, n):  # n < 8
        return self.get_byte(0xC4 + n)

    def TrapProp(self):
        return self.get_word(0xCC)

    def SizeX(self):
        return self.get_word(0xD0)

    def SizeY(self):
        return self.get_word(0xD4)

    def FrameCnt(self, n):  # n < 8, frame 需要右移8位
        return self.get_dword(0xD8 + n * 4)

    def FrameDelta(self, n):  # n < 8
        return self.get_word(0xF8 + n * 2)

    def CycleAnim(self, n):  # n < 8
        return self.get_byte(0x108 + n)

    def Lit(self, n):  # n < 8
        return self.get_byte(0x110 + n)

    def BlockLight(self, n):  # n < 8
        return self.get_byte(0x118 + n)

    def HasCollision(self, n):  # n < 8
        return self.get_byte(0x120 + n)

    def Attackable(self):
        return self.get_byte(0x128)

    def Strart(self, n):  # n < 8
        return self.get_byte(0x129 + n)

    def OrderFlag(self, n):  # n < 8
        return self.get_byte(0x131 + n)

    def EnvEffect(self):
        return self.get_byte(0x139)

    def IsDoor(self):
        return self.get_byte(0x13A)

    def BlocksVis(self):
        return self.get_byte(0x13B)

    def Orientation(self):
        return self.get_byte(0x13C)

    def PreOperate(self):
        return self.get_byte(0x13D)

    def Trans(self):
        return self.get_byte(0x13E)

    def Mode(self, n):  # n < 8
        return self.get_byte(0x13F + n)

    def Xoffset(self):
        return self.get_dword(0x48)

    def Yoffset(self):
        return self.get_dword(0x14C)

    def Draw(self):
        return self.get_byte(0x150)

    def Draw(self):
        return self.get_byte(0x150)

    def nHd(self):
        return self.get_byte(0x151)

    def nTR(self):
        return self.get_byte(0x152)

    def nLG(self):
        return self.get_byte(0x153)

    def nRA(self):
        return self.get_byte(0x154)

    def nLA(self):
        return self.get_byte(0x155)

    def nRH(self):
        return self.get_byte(0x156)

    def nLH(self):
        return self.get_byte(0x157)

    def nSH(self):
        return self.get_byte(0x158)

    def nS(self, n):  # n < 8
        return self.get_byte(0x159 + n)

    def TotalPieces(self):
        return self.get_byte(0x161)

    def XSpace(self):
        return self.get_byte(0x162)

    def YSpace(self):
        return self.get_byte(0x163)

    def Red(self):
        return self.get_byte(0x164)

    def Green(self):
        return self.get_byte(0x165)

    def Blue(self):
        return self.get_byte(0x166)

    def SubClass(self):
        return self.get_byte(0x167)

    def NameOffset(self):
        return self.get_dword(0x168)

    def OperateRange(self):
        return self.get_byte(0x16E)

    def ShrineFnc(self):
        return self.get_byte(0x16F)

    def Act(self):
        return self.get_byte(0x170)

    def Param(self, n):  # n < 8
        return self.get_dword(0x178 + n * 4)

    def Damage(self):
        return self.get_byte(0x19C)

    def Left(self):
        return self.get_dword(0x1A0)

    def Top(self):
        return self.get_dword(0x1A4)

    def Width(self):
        return self.get_dword(0x1A8)

    def Height(self):
        return self.get_dword(0x1AC)

    def InitFn(self):
        return self.get_byte(0x1B1)

    def PopulateFn(self):
        return self.get_byte(0x1B2)

    def OperateFn(self):
        return self.get_byte(0x1B3)

    def ClientFn(self):
        return self.get_byte(0x1B4)

    def AutoMap(self):
        return self.get_dword(0x1BC)


class CTextLevels(CMemory):
    def __init__(self, data):
        super(CTextLevels, self).__init__(data)

    def LevelNo(self):
        return self.get_word(0x00)

    def Pal(self):
        return self.get_byte(0x02)

    def Act(self):
        return self.get_byte(0x03)

    def Teleport(self):
        return self.get_byte(0x04)

    def Rain(self):
        return self.get_byte(0x05)

    def Mud(self):
        return self.get_byte(0x06)

    def NoPer(self):
        return self.get_byte(0x07)

    def IsInside(self):
        return self.get_byte(0x08)

    def DrawEdges(self):
        return self.get_byte(0x09)

    def WarpDist(self):
        return self.get_dword(0x0C)

    def MonLvl1(self):
        return self.get_word(0x10)

    def MonLvl2(self):
        return self.get_word(0x12)

    def MonLvl3(self):
        return self.get_word(0x14)

    def MonLvl1Ex(self):
        return self.get_word(0x16)

    def MonLvl2Ex(self):
        return self.get_word(0x18)

    def MonLvl3Ex(self):
        return self.get_word(0x1A)

    def MonDen(self, n):  # n < 3
        return self.get_dword(0x1C + n * 4)

    def MonUMin(self, n):  # n < 3
        return self.get_byte(0x28 + n)

    def MonUMax(self, n):  # n < 3
        return self.get_byte(0x2B + n)

    def MonWndr(self):
        return self.get_byte(0x2E)

    def MonSpcWalk(self):
        return self.get_byte(0x2F)

    def Quest(self):
        return self.get_byte(0x30)

    def RangedSpawn(self):
        return self.get_byte(0x31)

    def NumMon(self):
        return self.get_dword(0x32)

    def Mon(self, n):
        return self.get_word(0x36 + n * 2)

    def NMon(self, n):
        return self.get_word(0x68 + n * 2)

    def UMon(self, n):
        return self.get_word(0x9A + n * 2)

    def CMon(self, n):
        return self.get_word(0xCC + n * 2)

    def CPct(self, n):
        return self.get_word(0xD4 + n * 2)

    def CAmt(self, n):
        return self.get_word(0xDC + n * 2)

    def Waypoint(self):
        return self.get_byte(0xE4)

    def ObjGroup(self, n):
        return self.get_byte(0xE5 + n)

    def ObjPrb(self, n):
        return self.get_byte(0xED + n)

    def LevelName(self):
        return self.get_byte_pointer(0xF5)

    def LevelWarp(self):
        return self.get_byte_pointer(0x11D)

    def EntryFile(self):
        return self.get_byte_pointer(0x145)

    def LevelNameWB(self):
        return self.get_widebyte_pointer(0x16E)

    def LevelWarpWB(self):
        return self.get_widebyte_pointer(0x1BE)

    def Themes(self):
        return self.get_dword(0x210)

    def FloorFilter(self):
        return self.get_dword(0x214)

    def BlankScreen(self):
        return self.get_dword(0x218)

    def SoundEnv(self):
        return self.get_dword(0x21C)


class CTextGems(CMemory):
    def __init__(self, data):
        super(CTextGems, self).__init__(data)

    def Name(self):
        return self.get_byte_pointer(0x00)

    def Letter(self):
        return self.get_byte_pointer(0x20)

    def Code(self):
        return self.get_dword(0x28)

    def NumMods(self):
        return self.get_byte(0x2E)

    def Transform(self):
        return self.get_byte(0x2F)

    def WeaponMod1Code(self):
        return self.get_long(0x30)

    def WeaponMod1Param(self):
        return self.get_dword(0x34)

    def WeaponMod1Min(self):
        return self.get_dword(0x38)

    def WeaponMod1Max(self):
        return self.get_dword(0x3C)

    def WeaponMod2Code(self):
        return self.get_long(0x40)

    def WeaponMod2Param(self):
        return self.get_dword(0x44)

    def WeaponMod2Min(self):
        return self.get_dword(0x48)

    def WeaponMod2Max(self):
        return self.get_dword(0x4C)

    def WeaponMod3Code(self):
        return self.get_long(0x50)

    def WeaponMod3Param(self):
        return self.get_dword(0x54)

    def WeaponMod3Min(self):
        return self.get_dword(0x58)

    def WeaponMod3Max(self):
        return self.get_dword(0x5C)

    def HelmMod1Code(self):
        return self.get_long(0x60)

    def HelmMod1Param(self):
        return self.get_dword(0x64)

    def HelmMod1Min(self):
        return self.get_dword(0x68)

    def HelmMod1Max(self):
        return self.get_dword(0x6C)

    def HelmMod2Code(self):
        return self.get_long(0x70)

    def HelmMod2Param(self):
        return self.get_dword(0x74)

    def HelmMod2Min(self):
        return self.get_dword(0x78)

    def HelmMod2Max(self):
        return self.get_dword(0x7C)

    def HelmMod3Code(self):
        return self.get_long(0x80)

    def HelmMod3Param(self):
        return self.get_dword(0x84)

    def HelmMod3Min(self):
        return self.get_dword(0x88)

    def HelmMod3Max(self):
        return self.get_dword(0x8C)

    def ShieldMod1Code(self):
        return self.get_long(0x90)

    def ShieldMod1Param(self):
        return self.get_dword(0x94)

    def ShieldMod1Min(self):
        return self.get_dword(0x98)

    def ShieldMod1Max(self):
        return self.get_dword(0x9C)

    def ShieldMod2Code(self):
        return self.get_long(0xA0)

    def ShieldMod2Param(self):
        return self.get_dword(0xA4)

    def ShieldMod2Min(self):
        return self.get_dword(0xA8)

    def ShieldMod2Max(self):
        return self.get_dword(0xAC)

    def ShieldMod3Code(self):
        return self.get_long(0xB0)

    def ShieldMod3Param(self):
        return self.get_dword(0xB4)

    def ShieldMod3Min(self):
        return self.get_dword(0xB8)

    def ShieldMod3Max(self):
        return self.get_dword(0xBC)


'''
以下四列分别是不同情况下程序对物品所调用的DC6文件名称
Flippyfile：物品掉落时的动画文件
Invfile：物品栏里的图像文件
Uniqueinvfile：暗金物品所使用的物品栏图像文件
Setinvfile：套装物品所使用的物品栏图像文件
DC6文件的路径为data\global\items，例如：假如某物品的flippyfile列值为flpcap，则程序将在该物品掉落时播放data\global\items\flpcap.dc6文件
'''


class CTextItems(CMemory):
    def __init__(self, data):
        super(CTextItems, self).__init__(data)

    def FlippyFile(self):
        return self.get_byte_pointer(0x00)

    def InvFile(self):
        return self.get_byte_pointer(0x20)

    def UniqueInvFile(self):
        return self.get_byte_pointer(0x40)

    def SetInvFile(self):
        return self.get_byte_pointer(0x60)

    def ItemCode(self):
        return self.get_dword(0x80)

    def NormCode(self):
        return self.get_dword(0x84)

    def UberCode(self):
        return self.get_dword(0x88)

    def HellCode(self):
        return self.get_dword(0x8C)

    def AlternateGfx(self):
        return self.get_dword(0x90)

    def Spell(self):
        return self.get_dword(0x94)

    def State(self):
        return self.get_word(0x98)

    def State1(self):
        return self.get_word(0x9A)

    def State2(self):
        return self.get_word(0x9C)

    def Stat1(self):
        return self.get_word(0x9E)

    def Stat2(self):
        return self.get_word(0xA0)

    def Stat3(self):
        return self.get_word(0xA2)

    def Calc1(self):
        return self.get_dword(0xA4)

    def Calc2(self):
        return self.get_dword(0xA8)

    def Calc3(self):
        return self.get_dword(0xAC)

    def Len(self):
        return self.get_dword(0xB0)

    def SpellDesc(self):
        return self.get_word(0xB4)

    def SpellDescStr(self):
        return self.get_word(0xB6)

    def SpellDescCalc(self):
        return self.get_dword(0xB8)

    def BetterGem(self):
        return self.get_dword(0xBC)

    def WClass(self):
        return self.get_dword(0xC0)

    def TwoHandedWClass(self):
        return self.get_dword(0xC4)

    def TMogType(self):
        return self.get_dword(0xC8)

    def MinAC(self):
        return self.get_dword(0xCC)

    def MaxAC(self):
        return self.get_dword(0xD0)

    def GambleCost(self):
        return self.get_dword(0xD4)

    def Speed(self):
        return self.get_dword(0xD8)

    def BitField(self):
        return self.get_dword(0xDC)

    def Cost(self):
        return self.get_dword(0xE0)

    def MinStack(self):
        return self.get_dword(0xE4)

    def MaxStack(self):
        return self.get_dword(0xE8)

    def SpawnStack(self):
        return self.get_dword(0xEC)

    def GemOffset(self):
        return self.get_dword(0xF0)

    def NameStr(self):
        return self.get_word(0xF4)

    def Version(self):
        return self.get_word(0xF6)

    def AutoPrefix(self):
        return self.get_word(0xF8)

    def MissileType(self):
        return self.get_word(0xFA)

    def Rarity(self):
        return self.get_byte(0xFC)

    def Level(self):
        return self.get_byte(0xFD)

    def MinDam(self):
        return self.get_byte(0xFE)

    def MaxDam(self):
        return self.get_byte(0xFF)

    def MinMisDam(self):
        return self.get_byte(0x100)

    def MaxMisDam(self):
        return self.get_byte(0x101)

    def TwoHandMinDam(self):
        return self.get_byte(0x102)

    def TwoHandMaxDam(self):
        return self.get_byte(0x103)

    def RangeAdder(self):
        return self.get_byte(0x104)

    def StrBonus(self):
        return self.get_word(0x106)

    def DexBonus(self):
        return self.get_word(0x108)

    def RegStr(self):
        return self.get_word(0x10A)

    def RegDex(self):
        return self.get_word(0x10C)

    def Absorbs(self):
        return self.get_byte(0x10E)

    def InvWidth(self):
        return self.get_byte(0x10F)

    def InvHeight(self):
        return self.get_byte(0x110)

    def Block(self):
        return self.get_byte(0x111)

    def Durability(self):
        return self.get_byte(0x112)

    def NoDurability(self):
        return self.get_byte(0x113)

    def Missile(self):
        return self.get_byte(0x114)

    def Component(self):
        return self.get_byte(0x115)

    def RArm(self):
        return self.get_byte(0x116)

    def LArm(self):
        return self.get_byte(0x117)

    def Torso(self):
        return self.get_byte(0x118)

    def Legs(self):
        return self.get_byte(0x119)

    def RSpad(self):
        return self.get_byte(0x11A)

    def LSpad(self):
        return self.get_byte(0x11B)

    def TwoHanded(self):
        return self.get_byte(0x11C)

    def Usable(self):
        return self.get_byte(0x11D)

    def Type(self):
        return self.get_dword(0x11E)

    def Type2(self):
        return self.get_dword(0x120)

    def SubType(self):
        return self.get_dword(0x122)

    def DropSound(self):
        return self.get_dword(0x124)

    def UseSound(self):
        return self.get_dword(0x126)

    def DropSfxFrame(self):
        return self.get_byte(0x128)

    def Unique(self):
        return self.get_byte(0x129)

    def Quest(self):
        return self.get_byte(0x12A)

    def QuestDiffCheck(self):
        return self.get_byte(0x12B)

    def Transparent(self):
        return self.get_byte(0x12C)

    def TransTbl(self):
        return self.get_byte(0x12D)

    def NotUsed3(self):
        return self.get_byte(0x12E)

    def LightRadius(self):
        return self.get_byte(0x12F)

    def Belt(self):
        return self.get_byte(0x130)

    def AutoBelt(self):
        return self.get_byte(0x131)

    def Stackable(self):
        return self.get_byte(0x132)

    def Spawnable(self):
        return self.get_byte(0x133)

    def SpellIcon(self):
        return self.get_byte(0x134)

    def DurWarning(self):
        return self.get_byte(0x135)

    def QntWaning(self):
        return self.get_byte(0x136)

    def HasInv(self):
        return self.get_byte(0x137)

    def GemSockets(self):
        return self.get_byte(0x138)

    def TransmoGrify(self):
        return self.get_byte(0x139)

    def TMogMin(self):
        return self.get_byte(0x13A)

    def TMogMax(self):
        return self.get_byte(0x13B)

    def HitClass(self):
        return self.get_byte(0x13C)

    def OneOrTwoHanded(self):
        return self.get_byte(0x13D)

    def GemApplyType(self):
        return self.get_byte(0x13E)

    def LevelReq(self):
        return self.get_byte(0x13F)

    def MagicLvl(self):
        return self.get_byte(0x140)

    def Transform(self):
        return self.get_byte(0x141)

    def InvTrans(self):
        return self.get_byte(0x142)

    def CompactSave(self):
        return self.get_byte(0x143)

    def SkipName(self):
        return self.get_byte(0x144)

    def VendorMin(self, n):  # n < 17
        return self.get_byte(0x146 + n)

    def VendorMax(self, n):  # n < 17
        return self.get_byte(0x157 + n)

    def VendorMagicMin(self, n):  # n < 17
        return self.get_byte(0x168 + n)

    def VendorMagicMax(self, n):  # n < 17
        return self.get_byte(0x179 + n)

    def VendorMagicLvl(self, n):  # n < 17
        return self.get_byte(0x18A + n)

    def NightmareUpgrade(self):
        return self.get_dword(0x19C)

    def HellUpgrade(self):
        return self.get_dword(0x1A0)

    def PermStoreItem(self):
        return self.get_byte(0x1A4)

    def Multibuy(self):
        return self.get_byte(0x1A5)


class CTextRunes(CMemory):
    def __init__(self, data):
        super(CTextRunes, self).__init__(data)

    def Name(self):
        return self.get_byte_pointer(0x00)

    def RuneName(self):
        return self.get_byte_pointer(0x40)

    def Complete(self):
        return self.get_byte(0x80)

    def Server(self):
        return self.get_byte(0x80)

    def RuneNameID(self):
        return self.get_word(0x82)

    def Itypes(self, n):  # n < 6
        return self.get_word(0x86 + n * 2)

    def Etypes(self, n):  # n < 3
        return self.get_word(0x92 + n * 2)

    def Runes(self, n):  # n < 6
        return self.get_long(0x98 + n * 4)

    def T1Code1(self):
        return self.get_dword(0xB0)

    def T1Param1(self):
        return self.get_dword(0xB4)

    def T1Min1(self):
        return self.get_dword(0xB8)

    def T1Max1(self):
        return self.get_dword(0xBC)

    def T1Code2(self):
        return self.get_dword(0xC0)

    def T1Param2(self):
        return self.get_dword(0xC4)

    def T1Min2(self):
        return self.get_dword(0xC8)

    def T1Max2(self):
        return self.get_dword(0xCC)

    def T1Code3(self):
        return self.get_dword(0xD0)

    def T1Param3(self):
        return self.get_dword(0xD4)

    def T1Min3(self):
        return self.get_dword(0xD8)

    def T1Max3(self):
        return self.get_dword(0xDC)

    def T1Code4(self):
        return self.get_dword(0xE0)

    def T1Param4(self):
        return self.get_dword(0xE4)

    def T1Min4(self):
        return self.get_dword(0xE8)

    def T1Max4(self):
        return self.get_dword(0xEC)

    def T1Code5(self):
        return self.get_dword(0xF0)

    def T1Param5(self):
        return self.get_dword(0xF4)

    def T1Min5(self):
        return self.get_dword(0xF8)

    def T1Max5(self):
        return self.get_dword(0xFC)

    def T1Code6(self):
        return self.get_dword(0x100)

    def T1Param6(self):
        return self.get_dword(0x104)

    def T1Min6(self):
        return self.get_dword(0x108)

    def T1Max6(self):
        return self.get_dword(0x10C)

    def T1Code7(self):
        return self.get_dword(0x110)

    def T1Param7(self):
        return self.get_dword(0x114)

    def T1Min7(self):
        return self.get_dword(0x118)

    def T1Max7(self):
        return self.get_dword(0x11C)


class CTextCharStats(CMemory):
    def __init__(self, data):
        super(CTextCharStats, self).__init__(data)

    def NameWB(self):
        return self.get_widebyte_pointer(0x00)

    def Name(self):
        return self.get_byte_pointer(0x10)

    def baseSTR(self):
        return self.get_byte(0x20)

    def baseDEX(self):
        return self.get_byte(0x21)

    def baseENE(self):
        return self.get_byte(0x22)

    def baseVIT(self):
        return self.get_byte(0x23)

    def baseStamina(self):
        return self.get_byte(0x24)

    def HPAdd(self):
        return self.get_byte(0x25)

    def percentStr(self):
        return self.get_byte(0x26)

    def percentDex(self):
        return self.get_byte(0x27)

    def percentInt(self):
        return self.get_byte(0x28)

    def percentVit(self):
        return self.get_byte(0x29)

    def manaRegen(self):
        return self.get_word(0x2A)

    def toHitFactor(self):
        return self.get_dword(0x2C)

    def walkVelocity(self):
        return self.get_byte(0x30)

    def runVelocity(self):
        return self.get_byte(0x31)

    def runDrain(self):
        return self.get_byte(0x32)

    def lifePerLevel(self):
        return self.get_byte(0x33)

    def staminaPerLevel(self):
        return self.get_byte(0x34)

    def manaPerLevel(self):
        return self.get_byte(0x35)

    def lifePerVitality(self):
        return self.get_byte(0x36)

    def staminaPerVitality(self):
        return self.get_byte(0x37)

    def manaPerMagic(self):
        return self.get_byte(0x38)

    def blockFactor(self):
        return self.get_byte(0x39)

    def startSkill(self):
        return self.get_word(0x3A)

    def baseWClass(self):
        return self.get_dword(0x3C)

    def Item1(self):
        return self.get_dword(0x4C)

    def Item1Loc(self):
        return self.get_byte(0x50)

    def Item1Count(self):
        return self.get_byte(0x51)

    def Item1Unknown(self):
        return self.get_word(0x52)

    def Item2(self):
        return self.get_dword(0x54)

    def Item2Loc(self):
        return self.get_byte(0x58)

    def Item2Count(self):
        return self.get_byte(0x59)

    def Item2Unknown(self):
        return self.get_word(0x5A)

    def Item3(self):
        return self.get_dword(0x5C)

    def Item3Loc(self):
        return self.get_byte(0x60)

    def Item3Count(self):
        return self.get_byte(0x61)

    def Item3Unknown(self):
        return self.get_word(0x62)

    def Item4(self):
        return self.get_dword(0x64)

    def Item4Loc(self):
        return self.get_byte(0x68)

    def Item4Count(self):
        return self.get_byte(0x69)

    def Item4Unknown(self):
        return self.get_word(0x6A)

    def Item5(self):
        return self.get_dword(0x6C)

    def Item5Loc(self):
        return self.get_byte(0x70)

    def Item5Count(self):
        return self.get_byte(0x71)

    def Item5Unknown(self):
        return self.get_word(0x72)

    def Item6(self):
        return self.get_dword(0x74)

    def Item6Loc(self):
        return self.get_byte(0x78)

    def Item6Count(self):
        return self.get_byte(0x79)

    def Item6Unknown(self):
        return self.get_word(0x7A)

    def Item7(self):
        return self.get_dword(0x7C)

    def Item7Loc(self):
        return self.get_byte(0x80)

    def Item7Count(self):
        return self.get_byte(0x81)

    def Item7Unknown(self):
        return self.get_word(0x82)

    def Item8(self):
        return self.get_dword(0x84)

    def Item8Loc(self):
        return self.get_byte(0x88)

    def Item8Count(self):
        return self.get_byte(0x89)

    def Item8Unknown(self):
        return self.get_word(0x8A)

    def Item9(self):
        return self.get_dword(0x8C)

    def Item9Loc(self):
        return self.get_byte(0x90)

    def Item9Count(self):
        return self.get_byte(0x91)

    # def Item1Unknown(self):
    #     return self.get_word(0x92)

    def Item10(self):
        return self.get_dword(0x94)

    def Item10Loc(self):
        return self.get_byte(0x98)

    def Item10Count(self):
        return self.get_byte(0x99)

    def Item10Unknown(self):
        return self.get_word(0x9A)


class CTextItemProp(CMemory):
    def __init__(self, data):
        super(CTextItemProp, self).__init__(data)

    def PropId(self):
        return self.get_long(0x00)

    def Param(self):
        return self.get_long(0x04)

    def MinVal(self):
        return self.get_long(0x08)

    def MaxVal(self):
        return self.get_long(0x0C)


class CTextUniqueItems(CMemory):
    def __init__(self, data):
        super(CTextUniqueItems, self).__init__(data)

    def UniqueId(self):
        return self.get_word(0x00)

    def Desc(self):
        return self.get_byte_pointer(0x02)

    def UniqueNameId(self):
        return self.get_word(0x22)

    def Code(self, n):  # n < 4
        return self.get_byte(0x28 + n)

    def Flag(self):
        return self.get_byte(0x2C)

    def Carry1(self):
        return self.Flag() & 0x40

    def Qlvl(self):
        return self.get_word(0x34)

    def Reqlvl(self):
        return self.get_word(0x36)

    def CostMult(self):
        return self.get_dword(0x7C)

    def CostAdd(self):
        return self.get_dword(0x80)

    def ptProp(self, n):  # n < 12, return CItemProp
        return self.get_pointer(0x8C + n * 4)


class CTextSetItems(CMemory):
    def __init__(self, data):
        super(CTextSetItems, self).__init__(data)

    def Index(self):
        return self.get_word(0x00)

    def Desc(self):
        return self.get_byte_pointer(0x02)

    def LocaleTxtNo(self):
        return self.get_byte_pointer(0x24)

    def ItemCode(self):
        return self.get_byte_pointer(0x28)

    def SetIdx(self):
        return self.get_dword(0x2C)

    def Qlvl(self):
        return self.get_word(0x30)

    def Reqlvl(self):
        return self.get_word(0x32)

    def Rarity(self):
        return self.get_word(0x34)

    def CostMult(self):
        return self.get_dword(0x38)

    def CostAdd(self):
        return self.get_dword(0x3C)

    def ptItemProp(self, n):  # n < 9, return CItemProp
        return self.get_pointer(0x88 + n * 4)


class CTextSkillDesc(CMemory):
    def __init__(self, data):
        super(CTextSkillDesc, self).__init__(data)

    def NameID(self):
        return self.get_word(0x08)

    def NameShortID(self):
        return self.get_word(0x0A)

    def NameLongID(self):
        return self.get_word(0x0C)

    def NameAltID(self):
        return self.get_word(0x0E)


class CTextSkills(CMemory):
    def __init__(self, data):
        super(CTextSkills, self).__init__(data)

    def SkillId(self):
        return self.get_dword(0x00)

    def Flag1(self):
        return self.get_dword(0x04)

    def Flag2(self):
        return self.get_dword(0x08)

    def ClassId(self):
        return self.get_dword(0x0C)

    def Anim(self):
        return self.get_byte(0x10)

    def MonAnim(self):
        return self.get_byte(0x11)

    def SeqTrans(self):
        return self.get_byte(0x12)

    def SeqNum(self):
        return self.get_byte(0x13)

    def Range(self):
        return self.get_byte(0x14)

    def SelectProc(self):
        return self.get_byte(0x15)

    def SeqInput(self):
        return self.get_byte(0x16)

    def ITypeA1(self):
        return self.get_word(0x18)

    def ITypeA2(self):
        return self.get_word(0x1A)

    def ITypeA3(self):
        return self.get_word(0x1C)

    def ITypeB1(self):
        return self.get_word(0x1E)

    def ITypeB2(self):
        return self.get_word(0x20)

    def ITypeB3(self):
        return self.get_word(0x22)

    def ETypeA1(self):
        return self.get_word(0x24)

    def ETypeA2(self):
        return self.get_word(0x26)

    def ETypeB1(self):
        return self.get_word(0x28)

    def ETypeB2(self):
        return self.get_word(0x2A)

    def SrvStartFunc(self):
        return self.get_word(0x2C)

    def SrvDoFunc(self):
        return self.get_word(0x2E)

    def SrvPrgFunc1(self):
        return self.get_word(0x30)

    def SrvPrgFunc2(self):
        return self.get_word(0x32)

    def SrvPrgFunc3(self):
        return self.get_word(0x34)

    def PrgCalc1(self):
        return self.get_dword(0x38)

    def PrgCalc2(self):
        return self.get_dword(0x3C)

    def PrgCalc3(self):
        return self.get_dword(0x40)

    def PrgDamage(self):
        return self.get_word(0x44)

    def SrvMissile(self):
        return self.get_word(0x46)

    def SrvMissileA(self):
        return self.get_word(0x48)

    def SrvMissileB(self):
        return self.get_word(0x4A)

    def SrvMissileC(self):
        return self.get_word(0x4C)

    def SrvOverlay(self):
        return self.get_word(0x4E)

    def AuraFilter(self):
        return self.get_dword(0x50)

    def AuraStat1(self):
        return self.get_word(0x54)

    def AuraStat2(self):
        return self.get_word(0x56)

    def AuraStat3(self):
        return self.get_word(0x58)

    def AuraStat4(self):
        return self.get_word(0x5A)

    def AuraStat5(self):
        return self.get_word(0x5C)

    def AuraStat6(self):
        return self.get_word(0x5E)

    def AuraLenCalc(self):
        return self.get_dword(0x60)

    def AuraRangeCalc(self):
        return self.get_dword(0x64)

    def AuraStatCalc1(self):
        return self.get_dword(0x68)

    def AuraStatCalc2(self):
        return self.get_dword(0x6C)

    def AuraStatCalc3(self):
        return self.get_dword(0x70)

    def AuraStatCalc4(self):
        return self.get_dword(0x74)

    def AuraStatCalc5(self):
        return self.get_dword(0x78)

    def AuraStatCalc6(self):
        return self.get_dword(0x7C)

    def AuraState(self):
        return self.get_word(0x80)

    def AuraTargetState(self):
        return self.get_word(0x82)

    def AuraEvent1(self):
        return self.get_word(0x84)

    def AuraEvent2(self):
        return self.get_word(0x86)

    def AuraEvent3(self):
        return self.get_word(0x88)

    def AuraEventFunc1(self):
        return self.get_word(0x8A)

    def AuraEventFunc2(self):
        return self.get_word(0x8C)

    def AuraEventFunc3(self):
        return self.get_word(0x8E)

    def AuraTgtEvent(self):
        return self.get_word(0x90)

    def AuraTgtEventFunc(self):
        return self.get_word(0x92)

    def PassiveState(self):
        return self.get_word(0x94)

    def PassiveIType(self):
        return self.get_word(0x96)

    def PassiveStat1(self):
        return self.get_word(0x98)

    def PassiveStat2(self):
        return self.get_word(0x9A)

    def PassiveStat3(self):
        return self.get_word(0x9C)

    def PassiveStat4(self):
        return self.get_word(0x9E)

    def PassiveStat5(self):
        return self.get_word(0xA0)

    def PassiveCalc1(self):
        return self.get_dword(0xA4)

    def PassiveCalc2(self):
        return self.get_dword(0xA8)

    def PassiveCalc3(self):
        return self.get_dword(0xAC)

    def PassiveCalc4(self):
        return self.get_dword(0xB0)

    def PassiveCalc5(self):
        return self.get_dword(0xB4)

    def assiveEvent(self):
        return self.get_word(0xB8)

    def assiveEventFunc(self):
        return self.get_word(0xBA)

    def Summon(self):
        return self.get_word(0xBC)

    def PetType(self):
        return self.get_byte(0xBE)

    def SumMode(self):
        return self.get_byte(0xBF)

    def PetMax(self):
        return self.get_dword(0xC0)

    def SumSkill1(self):
        return self.get_word(0xC4)

    def SumSkill2(self):
        return self.get_word(0xC6)

    def SumSkill3(self):
        return self.get_word(0xC8)

    def SumSkill4(self):
        return self.get_word(0xCA)

    def SumSkill5(self):
        return self.get_word(0xCC)

    def SumSkCalc1(self):
        return self.get_dword(0xD0)

    def SumSkCalc2(self):
        return self.get_dword(0xD4)

    def SumSkCalc3(self):
        return self.get_dword(0xD8)

    def SumSkCalc4(self):
        return self.get_dword(0xDC)

    def SumSkCalc5(self):
        return self.get_dword(0xE0)

    def SumUMod(self):
        return self.get_word(0xE4)

    def SumOverlay(self):
        return self.get_word(0xE6)

    def CltMissile(self):
        return self.get_word(0xE8)

    def CltMissileA(self):
        return self.get_word(0xEA)

    def CltMissileB(self):
        return self.get_word(0xEC)

    def CltMissileC(self):
        return self.get_word(0xEE)

    def CltMissileD(self):
        return self.get_word(0xF0)

    def CltStFunc(self):
        return self.get_word(0xF2)

    def CltDoFunc(self):
        return self.get_word(0xF4)

    def CltPrgFunc1(self):
        return self.get_word(0xF6)

    def CltPrgFunc2(self):
        return self.get_word(0xF8)

    def CltPrgFunc3(self):
        return self.get_word(0xFA)

    def StSound(self):
        return self.get_word(0xFC)

    def unk0xFE(self):
        return self.get_word(0xFE)

    def DoSound(self):
        return self.get_word(0x100)

    def DoSoundA(self):
        return self.get_word(0x102)

    def DoSoundB(self):
        return self.get_word(0x104)

    def CastOverlay(self):
        return self.get_word(0x106)

    def TgtOverlay(self):
        return self.get_word(0x108)

    def TgtSound(self):
        return self.get_word(0x10A)

    def PrgOverlay(self):
        return self.get_word(0x10C)

    def PrgSound(self):
        return self.get_word(0x10E)

    def CltOverlayA(self):
        return self.get_word(0x110)

    def CltOverlayB(self):
        return self.get_word(0x112)

    def CltCalc1(self):
        return self.get_dword(0x114)

    def CltCalc2(self):
        return self.get_dword(0x118)

    def CltCalc3(self):
        return self.get_dword(0x11C)

    def ItemTarget(self):
        return self.get_word(0x120)

    def ItemCastSound(self):
        return self.get_word(0x122)

    def ItemCastOverlay(self):
        return self.get_dword(0x124)

    def PerDelay(self):
        return self.get_dword(0x128)

    def MaxLvl(self):
        return self.get_word(0x12C)

    def ResultFlags(self):
        return self.get_word(0x12E)

    def HitFlags(self):
        return self.get_dword(0x130)

    def HitClass(self):
        return self.get_dword(0x134)

    def Calc1(self):
        return self.get_dword(0x138)

    def Calc2(self):
        return self.get_dword(0x13C)

    def Calc3(self):
        return self.get_dword(0x140)

    def Calc4(self):
        return self.get_dword(0x144)

    def Param1(self):
        return self.get_dword(0x148)

    def dwParam2(self):
        return self.get_dword(0x14C)

    def Param3(self):
        return self.get_dword(0x150)

    def Param4(self):
        return self.get_dword(0x154)

    def Param5(self):
        return self.get_dword(0x158)

    def Param6(self):
        return self.get_dword(0x15C)

    def Param7(self):
        return self.get_dword(0x160)

    def Param8(self):
        return self.get_dword(0x164)

    def eapSel(self):
        return self.get_word(0x168)

    def ItemEffect(self):
        return self.get_word(0x16A)

    def ItemCltEffect(self):
        return self.get_dword(0x16C)

    def SkPoints(self):
        return self.get_dword(0x170)

    def ReqLevel(self):
        return self.get_word(0x174)

    def ReqStr(self):
        return self.get_word(0x176)

    def ReqDex(self):
        return self.get_word(0x178)

    def ReqInt(self):
        return self.get_word(0x17A)

    def ReqVit(self):
        return self.get_word(0x17C)

    def ReqSkill1(self):
        return self.get_word(0x17E)

    def ReqSkill2(self):
        return self.get_word(0x180)

    def ReqSkill3(self):
        return self.get_word(0x182)

    def StartMana(self):
        return self.get_word(0x184)

    def MinMana(self):
        return self.get_word(0x186)

    def ManaShift(self):
        return self.get_word(0x188)

    def Mana(self):
        return self.get_word(0x18A)

    def LevelMana(self):
        return self.get_word(0x18C)

    def AttackRank(self):
        return self.get_byte(0x18E)

    def LineOfSight(self):
        return self.get_byte(0x18F)

    def Delay(self):
        return self.get_dword(0x190)

    def SkillDesc(self):
        return self.get_dword(0x194)

    def ToHit(self):
        return self.get_dword(0x198)

    def LevToHit(self):
        return self.get_dword(0x19C)

    def ToHitCalc(self):
        return self.get_dword(0x1A0)

    def ToHitShift(self):
        return self.get_byte(0x1A4)

    def SrcDam(self):
        return self.get_byte(0x1A5)

    def MinDam(self):
        return self.get_dword(0x1A8)

    def MaxDam(self):
        return self.get_dword(0x1AC)

    def MinLvlDam1(self):
        return self.get_dword(0x1B0)

    def MinLvlDam2(self):
        return self.get_dword(0x1B4)

    def MinLvlDam3(self):
        return self.get_dword(0x1B8)

    def MinLvlDam4(self):
        return self.get_dword(0x1BC)

    def MinLvlDam5(self):
        return self.get_dword(0x1C0)

    def MaxLvlDam1(self):
        return self.get_dword(0x1C4)

    def MaxLvlDam2(self):
        return self.get_dword(0x1C8)

    def MaxLvlDam3(self):
        return self.get_dword(0x1CC)

    def MaxLvlDam4(self):
        return self.get_dword(0x1D0)

    def MaxLvlDam5(self):
        return self.get_dword(0x1D4)

    def DmgSymPerCalc(self):
        return self.get_dword(0x1D8)

    def EType(self):
        return self.get_word(0x1DC)

    def EMin(self):
        return self.get_dword(0x1E0)

    def EMax(self):
        return self.get_dword(0x1E4)

    def EMinLev1(self):
        return self.get_dword(0x1E8)

    def EMinLev2(self):
        return self.get_dword(0x1EC)

    def EMinLev3(self):
        return self.get_dword(0x1F0)

    def EMinLev4(self):
        return self.get_dword(0x1F4)

    def EMinLev5(self):
        return self.get_dword(0x1F8)

    def EMaxLev1(self):
        return self.get_dword(0x1FC)

    def EMaxLev2(self):
        return self.get_dword(0x200)

    def EMaxLev3(self):
        return self.get_dword(0x204)

    def EMaxLev4(self):
        return self.get_dword(0x208)

    def EMaxLev5(self):
        return self.get_dword(0x20C)

    def EDmgSymPerCalc(self):
        return self.get_dword(0x210)

    def ELen(self):
        return self.get_dword(0x214)

    def ELevLen1(self):
        return self.get_dword(0x218)

    def ELevLen2(self):
        return self.get_dword(0x21C)

    def ELevLen3(self):
        return self.get_dword(0x220)

    def ELenSymPerCalc(self):
        return self.get_dword(0x224)

    def Restrict(self):
        return self.get_word(0x224)

    def State1(self):
        return self.get_word(0x228)

    def State2(self):
        return self.get_word(0x22A)

    def State3(self):
        return self.get_word(0x22C)

    def AiType(self):
        return self.get_word(0x22E)

    def AiBonus(self):
        return self.get_word(0x230)

    def CostMult(self):
        return self.get_dword(0x234)

    def CostAdd(self):
        return self.get_dword(0x238)


class CTextItemTypes(CMemory):
    def __init__(self, data):
        super(CTextItemTypes, self).__init__(data)

    def Code(self):
        return self.get_dword(0x00)

    def Equiv1(self):
        return self.get_word(0x04)

    def Equiv2(self):
        return self.get_word(0x06)

    def Repair(self):
        return self.get_byte(0x08)

    def Body(self):
        return self.get_byte(0x09)

    def BodyLoc1(self):
        return self.get_byte(0x0A)

    def BodyLoc2(self):
        return self.get_byte(0x0B)

    def Shoots(self):
        return self.get_word(0x0C)

    def Quiver(self):
        return self.get_word(0x0E)

    def Throwable(self):
        return self.get_byte(0x10)

    def Reload(self):
        return self.get_byte(0x11)

    def ReEquip(self):
        return self.get_byte(0x12)

    def AutoStack(self):
        return self.get_byte(0x13)

    def Magic(self):
        return self.get_byte(0x14)

    def Rare(self):
        return self.get_byte(0x15)

    def Normal(self):
        return self.get_byte(0x16)

    def Charm(self):
        return self.get_byte(0x17)

    def Gem(self):
        return self.get_byte(0x18)

    def Beltable(self):
        return self.get_byte(0x19)

    def MaxSock1(self):
        return self.get_byte(0x1A)

    def MaxSock25(self):
        return self.get_byte(0x1B)

    def MaxSock40(self):
        return self.get_byte(0x1C)

    def TreasureClass(self):
        return self.get_byte(0x1D)

    def Rarity(self):
        return self.get_byte(0x1E)

    def StaffMods(self):
        return self.get_byte(0x1F)

    def CostFormula(self):
        return self.get_byte(0x20)

    def Class(self):
        return self.get_byte(0x21)

    def StorePage(self):
        return self.get_byte(0x22)

    def VarInvGfx(self):
        return self.get_byte(0x23)

    def InvGfx1(self):
        return self.get_byte_pointer(0x24)

    def InvGfx2(self):
        return self.get_byte_pointer(0x44)

    def InvGfx3(self):
        return self.get_byte_pointer(0x64)

    def InvGfx4(self):
        return self.get_byte_pointer(0x84)

    def InvGfx5(self):
        return self.get_byte_pointer(0xA4)

    def InvGfx6(self):
        return self.get_byte_pointer(0xC4)


# size=0x90 (144) (source : fct of dll) magicsuffix + magicprefix + automagic
class CTextAffix(CMemory):
    def __init__(self, data):
        super(CTextAffix, self).__init__(data)

    def Name(self):
        return self.get_byte_pointer(0x00)

    def NameCode(self):
        return self.get_word(0x20)

    def Version(self):
        return self.get_word(0x22)

    def Mod1Code(self):
        return self.get_dword(0x24)

    def Mod1Param(self):
        return self.get_dword(0x28)

    def Mod1Min(self):
        return self.get_dword(0x2C)

    def Mod1Max(self):
        return self.get_dword(0x30)

    def Mod2Code(self):
        return self.get_dword(0x34)

    def Mod2param(self):
        return self.get_dword(0x38)

    def Mod2Min(self):
        return self.get_dword(0x3C)

    def Mod2Max(self):
        return self.get_dword(0x40)

    def Mod3Code(self):
        return self.get_dword(0x44)

    def Mod3Param(self):
        return self.get_dword(0x48)

    def Mod3Min(self):
        return self.get_dword(0x4C)

    def Mod3Max(self):
        return self.get_dword(0x50)

    def Spawnable(self):
        return self.get_byte(0x54)

    def TransformColor(self):
        return self.get_word(0x56)

    def Level(self):
        return self.get_dword(0x58)

    def Group(self):
        return self.get_dword(0x5C)

    def MaxLevel(self):
        return self.get_dword(0x60)

    def Rare(self):
        return self.get_byte(0x64)

    def LevelReq(self):
        return self.get_byte(0x65)

    def ClassSpecific(self):
        return self.get_byte(0x66)

    def Classf(self):
        return self.get_byte(0x67)

    def ClassLevelReq(self):
        return self.get_byte(0x68)

    def Itype1(self):
        return self.get_word(0x6A)

    def Itype2(self):
        return self.get_word(0x6C)

    def Itype3(self):
        return self.get_word(0x6E)

    def Itype4(self):
        return self.get_word(0x70)

    def Itype5(self):
        return self.get_word(0x72)

    def Itype6(self):
        return self.get_word(0x74)

    def Itype7(self):
        return self.get_word(0x76)

    def Etype1(self):
        return self.get_word(0x78)

    def Etype2(self):
        return self.get_word(0x7A)

    def Etype3(self):
        return self.get_word(0x7C)

    def Etype4(self):
        return self.get_word(0x7E)

    def Etype5(self):
        return self.get_word(0x80)

    def Frequency(self):
        return self.get_byte(0x82)

    def Divide(self):
        return self.get_dword(0x84)

    def Multiply(self):
        return self.get_dword(0x88)

    def Add(self):
        return self.get_dword(0x8C)


class CTextProperties(CMemory):
    def __init__(self, data):
        super(CTextProperties, self).__init__(data)

    def ModCode(self):
        return self.get_word(0x00)

    def Set1(self):
        return self.get_byte(0x02)

    def Set2(self):
        return self.get_byte(0x03)

    def Set3(self):
        return self.get_byte(0x04)

    def Set4(self):
        return self.get_byte(0x05)

    def Set5(self):
        return self.get_byte(0x06)

    def Set6(self):
        return self.get_byte(0x07)

    def Set7(self):
        return self.get_byte(0x08)

    def Val1(self):
        return self.get_word(0x0A)

    def Val2(self):
        return self.get_word(0x0C)

    def Val3(self):
        return self.get_word(0x0E)

    def Val4(self):
        return self.get_word(0x10)

    def Val5(self):
        return self.get_word(0x12)

    def Val6(self):
        return self.get_word(0x14)

    def Val7(self):
        return self.get_word(0x16)

    def Func1(self):
        return self.get_byte(0x18)

    def Func2(self):
        return self.get_byte(0x19)

    def Func3(self):
        return self.get_byte(0x1A)

    def Func4(self):
        return self.get_byte(0x1B)

    def Func5(self):
        return self.get_byte(0x1C)

    def Func6(self):
        return self.get_byte(0x1D)

    def Func7(self):
        return self.get_byte(0x1E)

    def Stat1(self):
        return self.get_word(0x20)

    def Stat2(self):
        return self.get_word(0x22)

    def Stat3(self):
        return self.get_word(0x24)

    def Stat4(self):
        return self.get_word(0x26)

    def Stat5(self):
        return self.get_word(0x28)

    def Stat6(self):
        return self.get_word(0x2A)

    def Stat7(self):
        return self.get_word(0x2C)


class CTextItemStatCost(CMemory):
    def __init__(self, data):
        super(CTextItemStatCost, self).__init__(data)

    def StatID(self):
        return self.get_dword(0x00)

    '''
    Flags:
    sendOthe            //0x00000001
    signedf            //0x00000002
    damagerelated        //0x00000004
    itemspecific        //0x00000008
    direct                //0x00000010
    updateanimrate        //0x00000200
    fmin                //0x00000400
    fcallback            //0x00000800
    saved                //0x00001000
    cvssigned            //0x00002000
    '''

    def Flags(self):
        return self.get_dword(0x04)

    def SendBits(self):
        return self.get_byte(0x08)

    def SendParamBits(self):
        return self.get_byte(0x09)

    def CsvBits(self):
        return self.get_byte(0x0A)

    def CsvParam(self):
        return self.get_byte(0x0B)

    def Divide(self):
        return self.get_dword(0x0C)

    def Multiply(self):
        return self.get_dword(0x10)

    def Add(self):
        return self.get_dword(0x14)

    def ValShift(self):
        return self.get_byte(0x18)

    def SaveBits(self):
        return self.get_byte(0x19)

    def SaveBits109(self):
        return self.get_byte(0x1A)

    def SaveAdd(self):
        return self.get_dword(0x1C)

    def SaveAdd109(self):
        self.get_dword(0x20)

    def SaveParamBits(self):
        return self.get_dword(0x24)

    def Minaccr(self):
        return self.get_dword(0x2C)

    def Encode(self):
        return self.get_byte(0x30)

    def Maxstat(self):
        return self.get_word(0x32)

    def DescPriority(self):
        return self.get_word(0x34)

    def DescFunc(self):
        return self.get_byte(0x36)

    def DescVal(self):
        return self.get_byte(0x37)

    def DescStrPos(self):
        return self.get_word(0x38)

    def DescStrnNeg(self):
        return self.get_word(0x3A)

    def DescStr2(self):
        return self.get_word(0x3C)

    def Dgrp(self):
        return self.get_word(0x3E)

    def DgrpFunc(self):
        return self.get_byte(0x40)

    def DgrpVal(self):
        return self.get_byte(0x41)

    def DgrpStrPos(self):
        return self.get_word(0x42)

    def DgrpStrNeg(self):
        return self.get_word(0x44)

    def DgrpStr2(self):
        return self.get_word(0x46)

    def ItemEvent1(self):
        return self.get_word(0x48)

    def ItemEvent2(self):
        return self.get_word(0x4A)

    def ItemEventFunc1(self):
        return self.get_word(0x4C)

    def ItemEventFunc2(self):
        return self.get_word(0x4E)

    def KeepZero(self):
        return self.get_byte(0x50)

    def Op(self):
        return self.get_byte(0x54)

    def OpParam(self):
        return self.get_byte(0x55)

    def OpStat1(self):
        return self.get_word(0x58)

    def OpStat2(self):
        return self.get_word(0x5A)

    def OpStat3(self):
        return self.get_word(0x5C)

    def Stuff(self):
        return self.get_dword(0x140)


class CTextInventory(CMemory):
    def __init__(self, data):
        super(CTextInventory, self).__init__(data)

    def InvLeft(self):
        return self.get_dword(0x00)

    def InvRight(self):
        return self.get_dword(0x04)

    def InvTop(self):
        return self.get_dword(0x08)

    def InvBottom(self):
        return self.get_dword(0x0C)

    def GridX(self):
        return self.get_byte(0x10)

    def GridY(self):
        return self.get_byte(0x11)

    def GridLeft(self):
        return self.get_dword(0x14)

    def GridRight(self):
        return self.get_dword(0x18)

    def GridTop(self):
        return self.get_dword(0x1C)

    def GridBottom(self):
        return self.get_dword(0x20)

    def GridBoxWidth(self):
        return self.get_byte(0x24)

    def GridBoxHeight(self):
        return self.get_byte(0x25)

    def rArmLeft(self):
        return self.get_dword(0x28)

    def rArmRight(self):
        return self.get_dword(0x2C)

    def rArmTop(self):
        return self.get_dword(0x30)

    def rArmBottom(self):
        return self.get_dword(0x34)

    def rArmWidth(self):
        return self.get_byte(0x38)

    def rArmHeight(self):
        return self.get_byte(0x39)

    def TorsoLeft(self):
        return self.get_dword(0x3C)

    def TorsoRight(self):
        return self.get_dword(0x40)

    def TorsoTop(self):
        return self.get_dword(0x44)

    def TorsoBottom(self):
        return self.get_dword(0x48)

    def TorsoWidth(self):
        return self.get_byte(0x4C)

    def TorsoHeight(self):
        return self.get_byte(0x4D)

    def lArmLeft(self):
        return self.get_dword(0x50)

    def lArmRight(self):
        return self.get_dword(0x54)

    def lArmTop(self):
        return self.get_dword(0x58)

    def lArmBottom(self):
        return self.get_dword(0x5C)

    def lArmWidth(self):
        return self.get_byte(0x60)

    def lArmHeight(self):
        return self.get_byte(0x61)

    def HeadLeft(self):
        return self.get_dword(0x64)

    def HeadRight(self):
        return self.get_dword(0x68)

    def HeadTop(self):
        return self.get_dword(0x6C)

    def HeadBottom(self):
        return self.get_dword(0x70)

    def HeadWidth(self):
        return self.get_byte(0x74)

    def HeadHeight(self):
        return self.get_byte(0x75)

    def NeckLeft(self):
        return self.get_dword(0x78)

    def NeckRight(self):
        return self.get_dword(0x7C)

    def NeckTop(self):
        return self.get_dword(0x80)

    def NeckBottom(self):
        return self.get_dword(0x84)

    def NeckWidth(self):
        return self.get_byte(0x88)

    def NeckHeight(self):
        return self.get_byte(0x89)

    def rHandLeft(self):
        return self.get_dword(0x8C)

    def rHandRight(self):
        return self.get_dword(0x90)

    def rHandTop(self):
        return self.get_dword(0x94)

    def rHandBottom(self):
        return self.get_dword(0x98)

    def rHandWidth(self):
        return self.get_byte(0x9C)

    def rHandHeight(self):
        return self.get_byte(0x9D)

    def lHandLeft(self):
        return self.get_dword(0xA0)

    def lHandRight(self):
        return self.get_dword(0xA4)

    def lHandTop(self):
        return self.get_dword(0xA8)

    def lHandBottom(self):
        return self.get_dword(0xAC)

    def lHandWidth(self):
        return self.get_byte(0xB0)

    def lHandHeight(self):
        return self.get_byte(0xB1)

    def BeltLeft(self):
        return self.get_dword(0xB4)

    def BeltRight(self):
        return self.get_dword(0xB8)

    def BeltTop(self):
        return self.get_dword(0xBC)

    def BeltBottom(self):
        return self.get_dword(0xC0)

    def BeltWidth(self):
        return self.get_byte(0xC4)

    def BeltHeight(self):
        return self.get_byte(0xC5)

    def FeetLeft(self):
        return self.get_dword(0xC8)

    def FeetRight(self):
        return self.get_dword(0xCC)

    def FeetTop(self):
        return self.get_dword(0xD0)

    def FeetBottom(self):
        return self.get_dword(0xD4)

    def FeetWidth(self):
        return self.get_byte(0xD8)

    def FeetHeight(self):
        return self.get_byte(0xD9)

    def GlovesLeft(self):
        return self.get_dword(0xDC)

    def GlovesRight(self):
        return self.get_dword(0xE0)

    def GlovesTop(self):
        return self.get_dword(0xE4)

    def GlovesBottom(self):
        return self.get_dword(0xE8)

    def GlovesWidth(self):
        return self.get_byte(0xEC)

    def GlovesHeight(self):
        return self.get_byte(0xED)


class CTextDataTables(CMemory):
    def __init__(self, data):
        super(CTextDataTables, self).__init__(data)

    def MonStatsText(self):  # return CTextMonStats
        return self.get_dword(0xA78)

    def NbMonStats(self):
        return self.get_dword(0xA80)

    def SkillDescText(self):  # return CTextSkillDesc
        return self.get_dword(0xB8C)

    def NbSkilldesc(self):
        return self.get_dword(0xB94)

    def SkillText(self):  # return CTextSkill
        return self.get_dword(0xB98)

    def NbSkillText(self):
        return self.get_dword(0xBA0)

    def CharStatsText(self):  # return CTextCharStats
        return self.get_dword(0xBC4)

    def NbCharStats(self):
        return self.get_dword(0xBC8)

    def ItemStatCostText(self):  # return CTextItemStatCost
        return self.get_dword(0xBCC)

    def NbItemStatCosts(self):
        return self.get_dword(0xBD4)

    def ItemTypesText(self):  # return CTextItemTypes
        return self.get_dword(0xBF8)

    def NbItemTypes(self):
        return self.get_dword(0xBFC)

    def SetItemsText(self):  # return CTextSetItems
        return self.get_dword(0xC18)

    def NbSetItems(self):
        return self.get_dword(0xC1C)

    def UniqueItemsText(self):  # return CTextUniqueItems
        return self.get_dword(0xC24)

    def NbUniqueItems(self):
        return self.get_dword(0xC28)

    def LevelsText(self):  # return CTextLevels
        return self.get_dword(0xC58)

    def NbLevels(self):
        return self.get_dword(0xC5C)

    def CubeMainText(self):  # return CTextCubeMain
        return self.get_dword(0xCC4)

    def NbCubemain(self):
        return self.get_dword(0xCC8)

    def InventoryText(self):  # return CTextInventory
        return self.get_dword(0xCD0)

    def NbInventory(self):
        return self.get_dword(0xCCC)

    def NbItems(self):
        return self.get_dword(0xCD8)

    def ItemText(self):  # return CTextItem
        return self.get_dword(0xCDC)

    def ItemTextBis(self):  # return CTextItem
        return self.get_dword(0xCE0)

    def NbRunes(self):
        return self.get_dword(0xEDC)

    def RunesText(self):  # return CTextRunes
        return self.get_dword(0xEE0)


class CInventoryGrid(CMemory):
    def __init__(self, data):
        super(CInventoryGrid, self).__init__(data)

    def nGridX(self):
        return self.get_byte(0x00)

    def nGridY(self):
        return self.get_byte(0x01)

    def _align(self):
        return self.get_word(0x02)

    def Left(self):
        return self.get_long(0x04)

    def Right(self):
        return self.get_long(0x08)

    def Top(self):
        return self.get_long(0x0C)

    def Bottom(self):
        return self.get_long(0x10)

    def nGridWidth(self):
        return self.get_byte(0x14)

    def nGridHeight(self):
        return self.get_byte(0x15)

    def _align2(self):
        return self.get_word(0x16)


class CInventorySize(CMemory):
    def __init__(self, data):
        super(CInventorySize, self).__init__(data)

    def Left(self):
        return self.get_long(0x00)

    def Right(self):
        return self.get_long(0x04)

    def Top(self):
        return self.get_long(0x08)

    def Bottom(self):
        return self.get_long(0x0C)


class CInventoryLayout(CMemory):
    def __init__(self, data):
        super(CInventoryLayout, self).__init__(data)

    def Left(self):
        return self.get_long(0x00)

    def Right(self):
        return self.get_long(0x04)

    def Top(self):
        return self.get_long(0x08)

    def Bottom(self):
        return self.get_long(0x0C)

    def nWidth(self):
        return self.get_byte(0x10)

    def nHeight(self):
        return self.get_byte(0x11)


class CTextInventoryLayout(CMemory):
    def __init__(self, data):
        super(CTextInventoryLayout, self).__init__(data)

    def Inventory_Layout(self):  # return CTextInventoryLayout
        return self.get_pointer(0x00)

    def Grid_Layout(self):  # return CTextInventoryLayout
        return self.get_pointer(0x14)

    def RightArm_Layout(self):  # return CTextInventoryLayout
        return self.get_pointer(0x28)

    def Torso_Layout(self):  # return CTextInventoryLayout
        return self.get_pointer(0x3C)

    def LeftArm_Layout(self):  # return CTextInventoryLayout
        return self.get_pointer(0x50)

    def Head_Layout(self):  # return CTextInventoryLayout
        return self.get_pointer(0x64)

    def Neck_Layout(self):  # return CTextInventoryLayout
        return self.get_pointer(0x78)

    def RightHand_Layout(self):  # return CTextInventoryLayout
        return self.get_pointer(0x8C)

    def LeftHand_Layout(self):  # return CTextInventoryLayout
        return self.get_pointer(0xA0)

    def Belt_Layout(self):  # return CTextInventoryLayout
        return self.get_pointer(0xB4)

    def Feet_Layout(self):  # return CTextInventoryLayout
        return self.get_pointer(0xC8)

    def Gloves_Layout(self):  # return CTextInventoryLayout
        return self.get_pointer(0xDC)


class CBeltBox(CMemory):
    def __init__(self, data):
        super(CBeltBox, self).__init__(data)

    def Left(self):
        return self.get_long(0x00)

    def Right(self):
        return self.get_long(0x04)

    def Top(self):
        return self.get_long(0x08)

    def Bottom(self):
        return self.get_long(0x0C)


class CBeltsTxt(CMemory):
    def __init__(self, data):
        super(CBeltsTxt, self).__init__(data)

    def NumBoxes(self):
        return self.get_byte(0x04)

    def hBox(self, n):  # return CBeltBox
        return self.get_pointer(0x08 + n * 16)
